#ifndef _SHADOW_FILE_SYSTEM_COMMON_H_
#define _SHADOW_FILE_SYSTEM_COMMON_H_

#include <string>

#include <time.h>

#define SFS_DB_NAME "SFS"

using std::string;

typedef struct _SFS_DATA_NODE_CONFIG {
		string data_node_ip;
		int data_node_port;
		int data_node_namespace_id;
		time_t create_time;
		_SFS_DATA_NODE_CONFIG() { data_node_port = -1; data_node_namespace_id = -1; create_time = -1; }
} SFS_DATA_NODE_CONFIG;


typedef struct _SFS_NAMESPACE_CONFIG {
		int namespace_id;
		int namespace_weight;
		time_t create_time;
		_SFS_NAMESPACE_CONFIG() { namespace_id = -1; namespace_weight = -1; create_time = -1; }
} SFS_NAMESPACE_CONFIG;	

typedef struct _SFS_FILE_METADATA {
		string file_path;
		int file_size;
		int file_version;
		int lock_flag;
		time_t lock_time;
		time_t create_time;
		_SFS_FILE_METADATA() { file_size = -1; file_version = -1; lock_flag = -1; lock_time = -1; create_time = -1; }
} SFS_FILE_METADATA;

#endif
